package com.example.tasks.shop


open class BaseAdapter<out T : BaseType>(val dataSet: List<T>) {
    fun doWork(index: Int) {
        dataSet.getOrNull(index)?.id
    }
}

class TypeAAdapter(dataSet: List<AType>) : BaseAdapter<AType>(dataSet)

class TypeBAdapter(dataSet: List<BType>) : BaseAdapter<BType>(dataSet)


open class BaseType(val id: String)

class AType(id: String, val sex: Int) : BaseType(id)

class BType(id: String, val name: String) : BaseType(id)